
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';


import 'common_widgets.dart';

class WidgetUtil {


  ///统一头像加载
  static Widget buildAvatar(String? imageUrl,{double? width,double? height,String? defaulImage}){
    return CommonWidgets.buildCachedNetworkImage(
        imageUrl,
        fit: BoxFit.fill,
        width: width,
        height: height,
        erroImg: defaulImage ?? "assets/images/default_avatar.png",
        defaultImg: defaulImage ?? "assets/images/default_avatar.png",
       );
  }



}
